<template>
  <div class="search-list">
    <header>
      <div class="header-l" @click="goBack">
        <van-icon name="arrow-left" size="20" />
      </div>
      <div class="header-m">
        <img src="@/assets/img/search.png" alt="" />
        <input type="text" v-model="value" />
      </div>
      <div class="header-r">搜索</div>
    </header>
    <section>
        <ul>
            <li v-for="item in 8" :key="item">
                <img src="http://img.tea7.com/0169792_0.png?x-oss-process=image/resize,w_300" alt="">
                <p>浓郁豆香龙井1号</p>
                <div class="pb">
                    <div class="price">
                        ¥78
                    </div>
                    <div class="btn">
                        立即购买
                    </div>
                </div>
            </li>
        </ul>
    </section>
    <footer>
        <Tabbar/>
    </footer>
  </div>
</template>

<script>
import Tabbar from '@/components/common/Tabbar.vue'
export default {
  beforeMount() {
    // console.log(this.$route.query.value);
    this.value = this.$route.query.value
  },
  components: {
    Tabbar,
  },
  data() {
    return {
      value: "",
    };
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="less" scoped>
.search-list {
  header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #b0352f;
    color: #fff;
    height: 2.75rem;
    .header-l {
      width: 2.75rem;
      text-align: center;
    }
    .header-m {
      height: 1.875rem;
      border-radius: 1.875rem;
      background: #fff;
      display: flex;
      align-items: center;
      flex: 1;
      padding: 0 0.625rem;
      img {
        width: 1.25rem;
      }
      input {
        margin-left: 0.625rem;
        outline: none;
        border: none;
        color: #000;
      }
    }
    .header-r {
      width: 2.75rem;
      height: 2.75rem;
      line-height: 2.75rem;
      text-align: center;
    }
  }
  section {
    background: #f5f5f5;
    margin-top: 2.75rem;
    padding-bottom: 3.75rem;
    ul {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        li {
            width: 49.9%;
            padding: 7.5px;
            background: #fff;
            box-sizing: border-box;
            margin-bottom: 1px;
            p {
                font-size: 14px;
                color: #333;
                padding: .2344rem 0 0rem;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            .pb {
                display: flex;
                justify-content: space-between;
                .price {
                    color: #b0352f;
                }
                .btn {
                    color: #fff;
                    background-color: #b0352f;
                    text-align: center;
                    border-radius: 5px;
                    font-size: 13px;
                    padding: .2344rem .4688rem;
                }
            }
        }
    }
  }
}
</style>